package com.chb.sso.factory;

import com.chb.sso.feign.LogInfoFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author ：张家琪
 * @date ：Created in 2023/12/26 16:31
 * @description：
 * @modified By：
 * @version:
 */
@Component
@Slf4j
public class LogInfoFactory implements FallbackFactory<LogInfoFeign> {
    @Override
    public LogInfoFeign create(Throwable throwable) {
        return loginInfo -> {
            log.error("登录故障.............");
            log.error(throwable.getMessage());
            return null;
        };
    }
}